
set ( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} )

# REQUIRED does not work in CMake <=2.4.6 for SDL
Find_Package ( SDL REQUIRED )
Find_Package ( SDL_ttf REQUIRED ) # if using SDL_image
Find_Package ( SDL_gfx REQUIRED ) # if using SDL_image


# Workaround for the non-working REQUIRED flag
if ( NOT SDL_FOUND )
   message ( FATAL_ERROR "SDL not found!" )
   endif ( NOT SDL_FOUND )

add_executable (../pongian pongian.c tools.c pmenu.c level.c)

   
target_link_libraries (
    ../pongian
    ${SDL_LIBRARY}
    ${SDLTTF_LIBRARY} # if using SDL_image, obviously
    ${SDLGFX_LIBRARY} # if using SDL_image, obviously
    SDLmain # Sadly not included in SDL_LIBRARY variable
)

